package com.xiaoke.api.service;

import com.xiaoke.entity.Coupon;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient("service")
public interface CouponService {

    @GetMapping("/coupon/findByUserAndShop")
    List<Coupon> findByUserAndShop(@RequestParam("userId") String userId,@RequestParam("shopId") String shopId);
    @GetMapping("/coupon/selectByPrimaryKey")
    Coupon selectByPrimaryKey(@RequestParam("couponId") String couponId);

    @GetMapping("/coupon/countByUserAndShop")
    Integer countByUserAndShop(@RequestParam("userId") String userId,@RequestParam("shopId") String shopId);

    @GetMapping("/coupon/findById")
    Coupon findById(@RequestParam("couponId") String couponId);
}
